home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 13 / AMIGAplus Sonderheft 13 (1998)(ICP)(DE)[!].iso / rexx / flushcx.sirexx < prev    next >
Text File  |  1997-10-06  |  805b  |  50 lines

  1. /* This will close all running commodities */
  2.  
  3. options results
  4. signal on error
  5.  
  6. address 'INSPECTOR.1'
  7.  
  8.  
  9.  
  10. /* Select the Commodities list. */
  11.  
  12. GetDisplay ; currentdisplay = result
  13. If currentdisplay ~= 1 Then SetDisplay 1
  14.  
  15.  
  16. /* We don't want to be bothered with requesters */
  17.  
  18. GetPrefs Confirm ; oldconfirm = result
  19. if oldconfirm = "ON" Then SetPrefs Confirm OFF
  20.  
  21.  
  22. /* Work on all items */
  23. counter = 0
  24.  
  25. done = 0
  26.  
  27. Do while done = 0
  28.  
  29.    SelectNode Num counter ; if result = "ERROR" then done = 1
  30.  
  31.    If done = 0 Then Do
  32.       GetNodeInfo 1 ; nodename = result
  33.  
  34.       RemoveNode
  35.  
  36.       GetStatus ; status = result
  37.       If Left(status,14) = 'Error removing' Then Do
  38.  
  39.          counter = counter + 1  /* Go to the next one. */
  40.       End
  41.  
  42.    End
  43. End
  44.  
  45.  
  46.  
  47. /* Restore the Confirm setting */
  48.  
  49. SetPrefs Confirm oldconfirm
  50.